function show(){
	debugger;
	var row = grid.datagrid('getSelected');
	if(row){
		var selects = $('.datagrid-row-selected');
		if(selects.length>1){
			sys_alert('选择物品过多', '请选择一个物品，再点击详细信息', 'error');
			return;
		}
		greyLayer.open();
		detail_func.window('open');
		userForm.form('clear');
		var goods_kind = row.goods_kind;
		var newValue = '01';
		if(goods_kind==null){	//一般物品
			newValue = '01';	
		}else if (goods_kind=='B'){	//车辆
			newValue = '13';
		}else if(goods_kind=='E'){ //文物
			newValue = '05';
		}else if(goods_kind=='X'){ //现金
			newValue = '02';
		}else if(goods_kind=='L' ||goods_kind=='U' ||goods_kind=='V' ){//影音
			newValue = '06';
		}
		$('#h_goods_kind').val(newValue);
		$('#TBODY_01').hide();
		$('#TBODY_02').hide();
		$('#TBODY_05').hide();
		$('#TBODY_06').hide();
		$('#TBODY_13').hide();
		
    	var newID = 'TBODY_'+newValue;
    	$('#TBODY_01').hide();
    	$('#'+newID).show();
    	$.post(proName+"/casePropertyPrint/getGoodsInfo?goods_id="+row.goods_id+"&goods_kind="+newValue,function(result){
    		$('#goods_name').html(result.goods_name);
    		$('#goods_type').html(result.goods_type);
    		$('#goods_kind').html(result.goods_kind);
    		$('#goods_values').html(result.goods_values);
    		$('#case_name').html(result.case_name);
    		$('#case_type').html(result.case_type);
    		$('#case_status').html(result.case_status);
    		$('#case_simple_desc').html(result.case_simple_desc);
    		if(newValue=="01"){
    			$('#ordinary_brand').html(result.ordinary_brand);
    			$('#ordinary_model').html(result.ordinary_model);
    			$('#ordinary_num').html(result.ordinary_num);
    			$('#ordinary_weight').html(result.ordinary_weight);
    			$('#ordinary_color').html(result.ordinary_color);
    			$('#ordinary_grain').html(result.ordinary_grain);
    			$('#ordinary_fac').html(result.ordinary_fac);
    			$('#TBODY_01_WPTZ').html(result.goods_desc);
    		}else if(newValue=="02"){
    			$('#cash_type').html(result.cash_type);
    			$('#cash_value').html(result.cash_value);
    			$('#cash_num').html(result.cash_num);
    			$('#cash_cost').html(result.cash_cost);
    			$('#TBODY_02_WPTZ').html(result.goods_desc);
    		}else if(newValue=="05"){
    			$('#antique_num').html(result.antique_num);
    			$('#antique_level').html(result.antique_level);
    			$('#antique_color').html(result.antique_color);
    			$('#antique_grain').html(result.antique_grain);
    			$('#TBODY_05_WPTZ').html(result.goods_desc);
    		}else if(newValue=="06"){
    			$('#video_brief').html(result.video_brief);
    			$('#video_obj').html(result.video_obj);
    			$('#video_content').html(result.video_content);
    			$('#video_type').html(result.video_type);
    			$('#video_mode').html(result.video_mode);
    			$('#video_length').html(result.video_length);
    			$('#video_date').html(result.video_date);
    			$('#video_sub').html(result.video_sub);
    			$('#TBODY_06_WPTZ').html(result.goods_desc);
    		}else if(newValue=="07"){
    			$('#immovable_ceri').html(result.immovable_ceri);
    			$('#immovable_relatoin').html(result.immovable_relatoin);
    			$('#immovable_quate').html(result.immovable_quate);
    			$('#immovable_status').html(result.immovable_status);
    			$('#immovable_validity').html(result.immovable_validity);
    			$('#TBODY_07_WPTZ').html(result.goods_desc);
    		}else if(newValue='13'){
    			$('#car_no').html(result.car_no);
    			$('#car_type').html(result.car_type);
    			$('#car_spot').html(result.car_spot);
    			$('#car_mileage').html(result.car_mileage);
    			$('#car_color').html(result.car_color);
    			$('car_status').html(result.car_status);
    			$('#car_owner').html(result.car_owner);
    			$('#car_idcard').html(result.car_idcard);
    			$('#TBODY_13_WPTZ').html(result.goods_desc);
    		}
    	});
		// userForm.form('load', proName+'/casePropertyPrint/getGoodsInfo?goods_id=' + row.goods_id);
	}else{
		sys_alert('未选择物品', '请选择物品，再点击详细信息', 'error');
	}
	
}
function print(){
	sys_alert('未完成提示', '该功能因需求不明确，暂未实现', 'info');
	/*
	if(objs.length==0){
		sys_alert('错误提示', '请选择物品再进行打印', 'error');
		return;
	}
	greyLayer.open();
	win_func.window('open');
	form_func.form('clear');
	$('#selectTcode').val(objs[0]);
	*/
}
function search(){
	var queryParams = $('#tt').datagrid('options').queryParams;
	//type用来在后台判断是否点击按钮提交
	queryParams["type"] = 'search';
	//把页面中form 查询条件在这里补齐，queryParams["AJBH"] 的AJBH是提交得名字通过request.getParameter("AJBH")获得值,同jquery 发送ajax请求类似
	queryParams["AJMC"] = $('#AJMC').val();
	queryParams["WPMC"] = $('#WPMC').val();
	queryParams["BADW"] = $('#BADW').val();
	queryParams["BAR"] = $('#BAR').val();
	$('#tt').datagrid('options').pageNumber = 1;
	$('#tt').datagrid('reload');
}
function setUpSelect(rowIndex,rows,condition){
	var b = true;
	var start = parseInt(rowIndex);
	while(b){
		start = parseInt(start)-1;
		if(start<0){
			b = false;
		}else{
			if(rows[start].t_code==condition){
				grid.datagrid('selectRow', start);
			}else{
				b = false;
			}
		}
	}
}
function setUpUnSelect(rowIndex,rows,condition){
	var b = true;
	var start = parseInt(rowIndex);
	while(b){
		start = parseInt(start)-1;
		if(start<0){
			b = false;
		}else{
			if(rows[start].t_code==condition){
				grid.datagrid('unselectRow', start);
			}else{
				b = false;
			}
		}
	}
}
function setDownSelect(rowIndex,rows,condition){
	var b = true;
	var start = parseInt(rowIndex);
	while(b){
		start = parseInt(start)+1;
		if(start>rows.length){
			b=false;
		}else{
			if(start<=(rows.length-1) && rows[start].t_code==condition){
				grid.datagrid('selectRow', start);
			}else{
				b = false;
			}
		}
	}
}
function setDownUnSelect(rowIndex,rows,condition){
	var b = true;
	var start = parseInt(rowIndex);
	while(b){
		start = parseInt(start)+1;
		if(start>rows.length){
			b=false;
		}else{
			if(start<=(rows.length-1) && rows[start].t_code==condition){
				grid.datagrid('unselectRow', start);
			}else{
				b = false;
			}
		}
	}
}
function doSave(){
	var lend_person = $('#lend_person').val();
	var lend_company = $('#lend_company').val();
	var lend_limit = $('#lend_limit').val();
	var lend_reason = $('#lend_reason').val();
	form_func.form("submit",{
		url:proName+'/casePropertyLend/doUnStoredGoods?lend_person='+lend_person+'&lend_company='+lend_company+'&lend_limit='+lend_limit+'&lend_reason='+lend_reason,
		success:function(data){
			eval('data=' + data);
			if (data.success) {
				grid.datagrid('reload');
				win_func.window('close');
				greyLayer.close();
				objs = [];
			} else {
				sys_alert('错误提示', data.msg, 'error');
			}
		}
	});
}